UDF_DEFINE Function

Syntax

C UDF_DEFINE(C udf_code[,P variable_context])

Arguments

udf_code

A character string that contains the Xbasic statements that define a function.

variable_context

A pointer to the variable namespace that defines the scope of the function.

Description

Create a udf from the UDF script.

Discussion

The UDF_DEFINE() function adds the Xbasic statements, which define a function, to the list of UDFs in the specified variable namespace.

Example

<%A5
dim functionDefString as c
functionDefString = <<%code%
function myUdf1 as c (name as c )
    myUdf1 = upper(name)
end function
%code%
udf_define(functionDefString, global_variables() )

See Also